import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm';
import { IsNotEmpty } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
@Entity()
export class Order {
  @PrimaryGeneratedColumn()
  id: number;

  // 新增
  @Column({ comment: '' })
  userId: number;

  @Column({ comment: '' })
  userName: string;

  @Column({ comment: '' })
  userDirection: number;

  @Column({ comment: '' })
  contractInfo: string;

  // 修改数据-开始
  @Column({ comment: 'ID' })
  gateid: string;

  @Column({ comment: '' })
  finishTimeNew: string;

  @Column({ comment: '' })
  newSize: string;

  @Column({ comment: '' })
  geateCreateTime: string;

  @Column({ comment: '' })
  geateUpdateTime: string;

  // 修改数据-结束
  @Column({ comment: '' })
  is_reduce_only: boolean;

  @Column({ comment: '' })
  contract: string;

  @Column({ comment: '' })
  is_liq: boolean;

  @Column({ comment: '' })
  is_close: boolean;

  @Column({ comment: '' })
  size: number;

  @Column({ comment: '' })
  price: string;

  @Column({ comment: '' })
  text: string;

  @Column({ comment: '' })
  status: string;

  @Column({ comment: '' })
  finish_as: string;

  @Column({ comment: '' })
  left: number;

  @Column({ comment: '' })
  tif: string;

  @Column({ comment: '' })
  fill_price: string;

  @Column({ comment: '' })
  iceberg: number;

  @Column({ comment: '' })
  finish_time: string;

  @Column({ comment: '' })
  biz_info: string;

  @Column({ comment: '' })
  amend_text: string;

  @Column({ comment: '' })
  stp_act: string;

  @Column({ comment: '' })
  stp_id: number;

  @Column({ comment: '' })
  update_id: number;

  @Column({ comment: '' })
  pnl: string;

  @Column({ comment: '' })
  pnl_margin: string;

  @Column({ comment: '' })
  dual_type: number;

  @CreateDateColumn({
    type: 'timestamp',
    nullable: false,
    name: 'create_time',
    comment: '创建时间',
  })
  create_time: Date;

  @UpdateDateColumn({
    type: 'timestamp',
    nullable: false,
    name: 'update_time',
    comment: '更新时间',
  })
  update_time: string;
}
